<template>
  <el-container style="height:700px;border: 1px solid #eee;border-bottom:0;">
    <el-header style="text-align: right; font-size: 12px;height:50px">
      <!-- <el-dropdown>
        <i
          class="el-icon-setting"
          style="margin-right: 15px"
        ></i>
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item>查看</el-dropdown-item>
          <el-dropdown-item>新增</el-dropdown-item>
          <el-dropdown-item>删除</el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown> -->
      <h3 style="float:left">中间商后台管理</h3>
      <template>
        <div class="demo-type">
          <div>
            <el-avatar src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"></el-avatar>
          </div>
        </div>
      </template>
    </el-header>

    <el-container>
      <el-aside width="201px" style="border-right:1px solid #eee">
        <el-menu :default-openeds="['1', '2']" style="border:0">
          <el-submenu index="1">
            <template slot="title"><i class="el-icon-tickets"></i>订单详情</template>
            <el-menu-item index="1-1">订单统计</el-menu-item>
            <el-menu-item index="1-2" @click="showDetail">生产商发货详情</el-menu-item>
            <el-menu-item index="1-3" @click="showInspection">质检报告</el-menu-item>
          </el-submenu>
          <el-submenu index="2">
            <template slot="title"><i class="el-icon-thumb"></i>购买货物</template>
            <el-menu-item index="2-1" @click="showPurcharse">选购货物</el-menu-item>
            
          </el-submenu>
        </el-menu>
      </el-aside>
      <el-main>
       <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
export default {
    name:'Main',
    methods:{
        showPurcharse() {
            this.$router.push({
                name:'purchase',
            })
        },
        showDetail() {
            this.$router.push({
                name:'detail',
            })
        },
        showInspection() {
            this.$router.push({
                name:'inspection',
            })
        }
    }
};
</script>

<style>
.el-header {
  background: #e5e5e5;
}
.demo-type {
    margin-top: 4px;
}
</style>